﻿<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
   <meta charset="utf-8" />
  	  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>ManageSystem管理系统</title> 
    <!-- bootstrap 3.0.2 -->
    <link href="/resource/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <!-- Theme style -->
    <link href="/resource/css/style.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="/resource/js/jQueryMessage/css/message.skin.css" />
	<style>
		.stu_left{
			float: left;
			width: 300px;
		}
		.stu_center{
			float: left;
			width: 300px;
		}
		.stu_center1{
			float: left;
			width: 300px;
		}
		.stu_right{
			float: left;
			width: 300px;
		}
	</style>
</head>

<body>
	<div class="row">
	    <div class="col-md-12">
	    	<h1 class="panel-heading">更新学生信息</h1>
	        <!--breadcrumbs start -->
	        <ul class="breadcrumb">
				<li><a href="/index/toIndex"><i class="fa fa-home"></i> 首页</a></li>
				<li class="active">更新学生信息</li>
			</ul>
	        <!--breadcrumbs end -->
	    </div>
	</div>
	<div class="row">
		<div class="col-lg-12">
			<section class="panel">
				<div class="panel-body">
					<form class="col s12" id="form1" enctype="multipart/form-data" th:action="@{/stu/student/add}" onsubmit="return validateForm();" method="post">
						<input type="hidden" th:value="${student.id}" id="id" name="id"/>
						<div class="stu_left">
							<div class="form-group form-control-medium">
								<label for="collegeId">学院名称：</label>
								<input id="collegeId" name="collegeId" type="text"  class="form-control" th:value="${student.collegeId}"/>
							</div>
							<div class="form-group form-control-medium">
								<label for="majorId">专业名称：</label>
								<input id="majorId" name="majorId" type="text" class="form-control" th:value="${student.majorId}"/>
							</div>
							<div class="form-group form-control-medium">
								<label for="classId">班级ID：</label>
								<input id="classId" name="classId" type="text" class="form-control" th:value="${student.classId}"/>
							</div>
							<div class="form-group form-control-medium">
								<label for="stuNumber">学号：</label>
								<input id="stuNumber" name="stuNumber" type="text" class="form-control" th:value="${student.stuNumber}"/>
							</div>
							<div class="form-group form-control-medium">
								<label for="name">中文姓名：</label>
								<input id="name" name="name" type="text" class="form-control" th:value="${student.name}"/>
							</div>
							<div class="form-group form-control-medium">
								<label for="engName">英文姓名：</label>
								<input id="engName" name="engName" type="text" class="form-control" th:value="${student.engName}"/>
							</div>
						</div>
						<div class="stu_center">
							<div class="form-group form-control-medium">
								<label for="idCardNo">身份证号：</label>
								<input id="idCardNo" name="idCardNo" type="text" class="form-control" th:value="${student.idCardNo}"/>
							</div>
							<div class="form-group form-control-medium">
								<label for="mobilePhone">手机号：</label>
								<input id="mobilePhone" name="mobilePhone" type="text" class="form-control" th:value="${student.mobilePhone}"/>
							</div>
							<div class="form-group form-control-medium">
								<label for="birth">出生日期：</label>
								<input id="birth" name="birth" type="date" class="form-control" th:value="${#dates.format(student.birth,'yyyy-MM-dd')}"/>
							</div>
							<div class="form-group form-control-medium">
								<label for="height">身高cm：</label>
								<input id="height" name="height" type="number" min="100" max="250" class="form-control" th:value="${student.height}"/>
							</div>
							<div class="form-group form-control-medium">
								<label for="weight">体重kg：</label>
								<input id="weight" name="weight" type="number" min="10" max="200" class="form-control" th:value="${student.weight}"/>
							</div>
							<div class="form-group form-control-medium">
								<label for="nation">名族：</label>
								<input id="nation" name="nation" type="text" class="form-control" th:value="${student.nation}"/>
							</div>
						</div>
						<div class="stu_center1">
							<div class="form-group form-control-medium">
								<label for="domicilePlaceProvince">籍贯(省)：</label>
								<input id="domicilePlaceProvince" name="domicilePlaceProvince" type="text" class="form-control" th:value="${student.domicilePlaceProvince}"/>
							</div>
							<div class="form-group form-control-medium">
								<label for="domicilePlaceCity">籍贯(市)：</label>
								<input id="domicilePlaceCity" name="domicilePlaceCity" type="text" class="form-control" th:value="${student.domicilePlaceCity}"/>
							</div>
							<div class="form-group form-control-medium">
								<label for="domicilePlaceAddress">户籍地址：</label>
								<input id="domicilePlaceAddress" name="domicilePlaceAddress" type="text" class="form-control" th:value="${student.domicilePlaceAddress}"/>
							</div>
							<div class="form-group form-control-medium">
								<label for="presentAddress">居住地址：</label>
								<input id="presentAddress" name="presentAddress" type="text" class="form-control" th:value="${student.presentAddress}"/>
							</div>
							<div class="form-group form-control-medium">
								<label for="hobby">爱好：</label>
								<input id="hobby" name="hobby" type="text" class="form-control" th:value="${student.hobby}"/>
							</div>
							<div class="form-group form-control-medium">
								<label for="entryDate">入学日期：</label>
								<input id="entryDate" name="entryDate" type="date" class="form-control" th:value="${#dates.format(student.entryDate,'yyyy-MM-dd')}"/>
							</div>
						</div>
						<div class="stu_right">
							<div class="form-group form-control-medium">
								<label for="email">邮箱：</label>
								<input id="email" name="email" type="email" class="form-control" th:value="${student.email}"/>
							</div>
							<div class="form-group">
								<label for="gender">性别：</label>
								<label class="checkbox-inline">
									<input type="radio" name="gender" id="type-yes" value="0" th:checked="${student.gender} eq '0'">女
								</label>
								<label class="checkbox-inline">
									<input type="radio" name="gender" id="type-no" value="1" th:checked="${student.gender} eq '1'">男
								</label>
							</div>
							<div class="form-group">
								<label for="political">政治面貌：</label>
								<label class="checkbox-inline">
									<input type="radio" name="political" id="visible-yes" value="1" th:checked="${student.political} eq '1'">团员
								</label>
								<label class="checkbox-inline">
									<input type="radio" name="political" id="visible-no" value="2" th:checked="${student.political} eq '2'">党员
								</label>
								<label class="checkbox-inline">
									<input type="radio" name="political" id="visible-yse-no" value="3" th:checked="${student.political} eq '3'">群众
								</label>
							</div>
							<div class="form-group">
								<label for="marital">婚姻状况：</label>
								<label class="checkbox-inline">
									<input type="radio" name="marital" id="marital-yes" value="0" th:checked="${student.marital} eq '0'">未婚
								</label>
								<label class="checkbox-inline">
									<input type="radio" name="marital" id="marital-no" value="1" th:checked="${student.marital} eq '1'">已婚
								</label>
							</div>
							<div class="form-group">
								<label for="status">学籍状态：</label>
								<label class="checkbox-inline">
									<input type="radio" name="status" id="status-yes" value="1" th:checked="${student.status} eq '1'">在读
								</label>
								<label class="checkbox-inline">
									<input type="radio" name="status" id="status-no" value="2" th:checked="${student.status} eq '2'">毕业
								</label>
								<label class="checkbox-inline">
									<input type="radio" name="status" id="status-yes-no" value="3" th:checked="${student.status} eq '3'">休学
								</label>
							</div>
							<input id="updatedBy" name="updatedBy" type="hidden" class="form-control" />
							<div class="form-btn-group-left">
			            		<button type="submit" class="btn btn-info">保存</button>
								<button type="button" class="btn btn-info" id="back"><a href="/stu/student/list">返回</a></button>
			            	</div>
						</div>
					</form>
				</div>
			</section>
		</div>
	</div>
	<script src="/resource/js/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="/resource/js/jQueryMessage/js/jquery.plugin.message.js"></script>
        <script type="text/javascript" th:inline="javascript">
	   	/* 保存方法 */
	    function validateForm(){
			return true;
	    }

		//获取当前登录的用户
		var userStr = sessionStorage.getItem("douglas");
		if(userStr == null || userStr == "" || userStr == "undefined"){
			window.location.href = "/admin/user/toLogin";
		}else{
			var user = JSON.parse(userStr);
			$("#updatedBy").val(user.realname);
		}
    </script>
</body>
</html>
